package com.itheima.search.service;

import co.elastic.clients.elasticsearch.core.SearchResponse;
import com.itheima.search.domain.NewsVO;
import com.itheima.search.domain.SearchParam;
import com.itheima.search.domain.SearchResult;

import java.io.IOException;


public interface NewsSearchService {
    /**
     * 新闻搜索
     * @param searchParam
     * @return
     */
    SearchResult newsSearch(SearchParam searchParam) throws IOException;


    /**
     * 根据ID搜索
     * @param newsId
     * @return
     */
    NewsVO queryNewsById(Long newsId) throws IOException;
}
